package lew.bing.gwalo.semaphoreLimiter;

import java.util.Map;
import java.util.concurrent.Semaphore;

/**
 * Created by 刘国兵 on 2018/7/7.
 *
 */
public interface Permits {


    /**
     * 获取信号量
     * @param group
     * @param key
     * @param defaultPermits
     * @return
     */
    Semaphore takePermits(String group, String key, int defaultPermits);

    /**
     * 改变信号量permits
     */
    void changePermits();

    void changePermits(String key);

}
